﻿#region Using

using System;
using System.Collections.Specialized;
using System.Web;
using System.Web.UI;
using Asah.SiteWorx.BlogEngine.Core;

#endregion

public partial class Blog_Widgets_CatagoryList_Edit : WidgetEditBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        StringDictionary settings = GetSettings();
        bool showRssIcon = true;
        bool showPostCount = true;
        if (settings.ContainsKey("showrssicon"))
        {
            bool.TryParse(settings["showrssicon"], out showRssIcon);
            bool.TryParse(settings["showpostcount"], out showPostCount);
        }

        cbShowRssIcon.Checked = showRssIcon;
        cbShowPostCount.Checked = showPostCount;
    }

    public override void Save()
    {
        StringDictionary settings = GetSettings();
        settings["showrssicon"] = cbShowRssIcon.Checked.ToString();
        settings["showpostcount"] = cbShowPostCount.Checked.ToString();
        SaveSettings(settings);
    }
}
